import pandas as pd

"""
去除重复记录
"""

inventory = pd.read_csv('old_inventory.csv')
inventory.drop('Unnamed: 0', axis=1, inplace=True)
inventory.sort_values('update_tm', ascending=False, inplace=True)
inventory.drop_duplicates('artisan_id', inplace=True)
inventory.to_csv('inventory.csv')
